package edu.itcs6112.za.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import edu.itcs6112.za.domain.Contact;

public interface ContactRepository extends PagingAndSortingRepository<Contact, Long>{

	public final static String FIND_BY_LAST_NAME = "FROM Contact c WHERE c.lastName = :lastname";
	
	@Query(FIND_BY_LAST_NAME)
	List<Contact> findByLastName(@Param("lastname") String lastname);
}

